﻿using nplJobsCommon.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Elmah;


namespace nplJobsDAL.Select
{
    public class SelectJobSeekerSearchCV : DataAccessBase
    {
        public SelectJobSeekerSearchCV()
        {
            StoredProcedureName = "spSelectJobSeekerForSearchCV";
        }

        public DataSet GetJobSeekerForSearchCV(int StartIndex, int pageSize)
        {
            DataBaseHelper dbHelper ;
            DataSet ds = new DataSet();

            try
            {

                dbHelper = new DataBaseHelper(StoredProcedureName);
                SqlParameter prm = new SqlParameter("@pStartIndex", SqlDbType.Int);
                prm.Value = StartIndex;
                SqlParameter prm1 = new SqlParameter("@pPageSize", SqlDbType.Int);
                prm1.Value = pageSize;

                SqlParameter[] prmCollection = { prm, prm1 };

                dbHelper.Parameters = prmCollection;
                ds = dbHelper.Run(base.ConnectionString, dbHelper.Parameters);
            }
            catch (Exception ex)
            {
                ErrorSignal.FromCurrentContext().Raise(ex);
            }

            return ds;
        }

    }
}
